package cn.tedu._07springaop.aop;

import cn.tedu._07springaop.egaop.CartServiceImpl;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试类
 */
public class TestCalculator {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu._07springaop");
        //CalculatorImpl bean = context.getBean(CalculatorImpl.class);
        //bean.add(20, 10);

        //购物车练习测试
        CartServiceImpl service = context.getBean(CartServiceImpl.class);
        service.addCart("屠龙宝刀");
    }
}
